Optimal. Leaf size=71 \[ \frac{a^3 \tan (e+f x)}{c f}-\frac{4 i a^3}{f (c-i c \tan (e+f x))}+\frac{4 i a^3 \log (\cos (e+f x))}{c f}-\frac{4 a^3 x}{c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.122143, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3522, 3487, 43} \[ \frac{a^3 \tan (e+f x)}{c f}-\frac{4 i a^3}{f (c-i c \tan (e+f x))}+\frac{4 i a^3 \log (\cos (e+f x))}{c f}-\frac{4 a^3 x}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3522
Rule 3487
Rule 43
Rubi steps
\begin{align*} \int \frac{(a+i a \tan (e+f x))^3}{c-i c \tan (e+f x)} \, dx &=\left (a^3 c^3\right ) \int \frac{\sec ^6(e+f x)}{(c-i c \tan (e+f x))^4} \, dx\\ &=\frac{\left (i a^3\right ) \operatorname{Subst}\left (\int \frac{(c-x)^2}{(c+x)^2} \, dx,x,-i c \tan (e+f x)\right )}{c^2 f}\\ &=\frac{\left (i a^3\right ) \operatorname{Subst}\left (\int \left (1+\frac{4 c^2}{(c+x)^2}-\frac{4 c}{c+x}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^2 f}\\ &=-\frac{4 a^3 x}{c}+\frac{4 i a^3 \log (\cos (e+f x))}{c f}+\frac{a^3 \tan (e+f x)}{c f}-\frac{4 i a^3}{f (c-i c \tan (e+f x))}\\ \end{align*}
Mathematica [B] time = 2.36298, size = 214, normalized size = 3.01 \[ \frac{a^3 \sec (e) (\tan (e+f x)-i) \left (-2 f x \sin (e+2 f x)+2 i \sin (e+2 f x)-2 f x \sin (3 e+2 f x)+i \sin (3 e+2 f x)-2 i f x \cos (3 e+2 f x)+\cos (3 e+2 f x)-\cos (3 e+2 f x) \log \left (\cos ^2(e+f x)\right )+\cos (e) \left (-2 \log \left (\cos ^2(e+f x)\right )-4 i f x+3\right )+\cos (e+2 f x) \left (-\log \left (\cos ^2(e+f x)\right )-2 i f x\right )+i \sin (e+2 f x) \log \left (\cos ^2(e+f x)\right )+i \sin (3 e+2 f x) \log \left (\cos ^2(e+f x)\right )-i \sin (e)\right )}{2 c f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.026, size = 62, normalized size = 0.9 \begin{align*}{\frac{{a}^{3}\tan \left ( fx+e \right ) }{cf}}+4\,{\frac{{a}^{3}}{cf \left ( \tan \left ( fx+e \right ) +i \right ) }}-{\frac{4\,i{a}^{3}\ln \left ( \tan \left ( fx+e \right ) +i \right ) }{cf}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.36956, size = 236, normalized size = 3.32 \begin{align*} \frac{-2 i \, a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 2 i \, a^{3} +{\left (4 i \, a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, a^{3}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{c f e^{\left (2 i \, f x + 2 i \, e\right )} + c f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.82855, size = 92, normalized size = 1.3 \begin{align*} \frac{4 a^{3} \left (\begin{cases} - \frac{i e^{2 i f x}}{2 f} & \text{for}\: f \neq 0 \\x & \text{otherwise} \end{cases}\right ) e^{2 i e}}{c} + \frac{4 i a^{3} \log{\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c f} + \frac{2 i a^{3} e^{- 2 i e}}{c f \left (e^{2 i f x} + e^{- 2 i e}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.52526, size = 250, normalized size = 3.52 \begin{align*} \frac{2 \,{\left (-\frac{4 i \, a^{3} \log \left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + i\right )}{c} + \frac{2 i \, a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 1 \right |}\right )}{c} + \frac{2 i \, a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 1 \right |}\right )}{c} + \frac{-2 i \, a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + 2 i \, a^{3}}{{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 1\right )} c} + \frac{6 i \, a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} - 16 \, a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) - 6 i \, a^{3}}{c{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + i\right )}^{2}}\right )}}{f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]